test(gates): the two document-count pins allow up to two words between numeral and noun - #7915
Merged
Merged
Conversation
…n numeral and noun objectui#7448 landed the same document-count pin in two gate test files and stated the rule in both docstrings as "a numeral DIRECTLY qualifying a document-population noun". Both implemented it as strict adjacency, so a single adjective inside the noun phrase defeated them. Measured, not inferred. #7448's regex run verbatim over `check-links.yml`'s header as it stood on origin/main at 83fe6e7 — a header carrying two live drifted counts — reports one of the two: twin regex => ["183 files"] third regex => ["15 INTERNAL documents","183 files"] The count it scores clean is the one that had drifted furthest (15 against a measured 17), because an adjective sits between the numeral and the noun. This carries the third copy's pattern (objectui#7825, PR #7885, `check-links-workflow.test.ts`) to both twins verbatim: up to two intervening words, issue references excluded at the pattern level by a negative lookbehind rather than by luck, noun set unchanged. No fourth spelling is invented. The docstrings drop "DIRECTLY" — keeping it would only have inverted the same gap between what the pin claims and what it does. Latent, not live: both twin workflow headers are clean under both patterns on today's tree, so this closes a proven hole rather than a live violation. Part of objectui#7888 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
This was referenced Sep 6, 2026
os-sam
marked this pull request as ready for review
September 6, 2026 03:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7888
objectui#7448 landed the same document-count pin in two gate test files and stated the rule in both docstrings as "a numeral DIRECTLY qualifying a document-population noun". Both implemented it as strict adjacency, so a single adjective inside the noun phrase defeated them. This brings the implementation up onto the declaration by carrying the third copy's pattern (objectui#7825, PR objectui#7885) to both twins verbatim.
The measurement, re-verified in this branch
objectui#7448's regex run verbatim over
check-links.yml's header as it stood onorigin/mainat83fe6e741— a header carrying two live drifted counts:One of two. The count the adjacent-only pattern scores clean is the one that had drifted furthest (15 against a measured 17), because an adjective sits between the numeral and the noun.
What changed
The pattern only, in the two files the card names, plus the docstring sentence that described it:
NEGLOOKBEHINDabove stands for a negative lookbehind over the character class of#, word characters and a dot, written out as a word on purpose: that group opens with the same two characters a body sanitizer treats as the start of a markup declaration, and this repository has measured such fragments being eaten inside fenced code blocks. The literal is in the diff, which is authoritative.Up to two intervening words; issue references ruled out at the pattern level by a negative lookbehind rather than by luck; noun set unchanged. No fourth spelling was invented — this is
check-links-workflow.test.ts's pattern, character for character. The wordDIRECTLYleaves the docstrings: keeping it would only have inverted the same gap between what the pin claims and what it does.Latent, not live — re-verified, and the grading holds
Both twin workflow headers are clean under both patterns on this branch's base (
84ce0b80d):No claim on either header is false today. This closes a proven hole; it is not firefighting.
Positive controls — four directions, each twin
A pin that cannot fail is not a pin. Each mutation was injected into the workflow header the pin actually reads, proven on disk first (injected-hit count plus blob hash), and each restore was proven by state (
git diff HEADempty and blob back to the HEAD blob), restoring withgit checkout HEAD -- ABSOLUTE_PATHso a written index could not hand the mutation back.doc-fence-languagesdoc-component-typesholds 15 INTERNAL documents227 covered documents/188 scanned documents#7448 documents the ruleBoth A and C name the pin in the failure, e.g.
Direction C is objectui#7448's own ablation design and the one that matters most: 227 is the live figure
check:doc-fencesprints today, and 188 is whatcheck:doc-typesprints today. Both are refused anyway. The pin governs this class of writing, not "a wrong number" — a pin that only rejected wrong numbers would wave the same trap through tomorrow when the number happened to be right.Restore evidence, both twins, all legs:
The new pattern is strictly better, not merely wider
Running both patterns over the three control shapes:
holds 15 INTERNAL documents[]— missed["15 INTERNAL documents"]the 227 covered documents ...[]— missed["227 covered documents"]#7448 documents the rule["7448 documents"]— false positive[]The third row was not part of the card and is worth recording: the old pattern read an issue reference directly followed by a population noun as a document count. The negative lookbehind removes a false positive at the same time as it widens the true-positive reach.
Clause 5 — the tightened pattern's reach on today's tree, measured not assumed
Tightening a predicate can turn green things red, so this was measured before shipping.
On the surfaces these two pins read: zero. Both twin headers are empty under the new pattern (above), so no currently-green pin turns red.
Repo-wide census over all 34 workflow headers, for the record and for the seat that takes objectui#7901:
The single new hit is
Removed 0 pending changeset file(s)— a quoted log line, not a population claim, and in a workflow no pin reads. Both files are outside this pin family's coverage entirely, so nothing here changes any check's colour. Flagging it because a future coverage widening would have to decide about it.Ordering, for the next seat
This card (narrowness) had to precede objectui#7901 (coverage: all three copies read
.github/workflows/*.ymlheaders and none readscontent/docs/**). Had the order been reversed, objectui#7901's census would have counted coverage using a known-narrow regex and scored its misses as absences. That ordering no longer needs re-deriving.Out of scope, filed
objectui#7914 — neither twin has an in-file positive control. Each pin holds one assertion against a header that is empty today, so both would pass identically if the pattern were deleted. The third copy carries a fixture block; the twins do not. The four-direction demonstration above had to be run out of band. Not carried here because this card's file surface is the patterns only.
Verification
Gate union re-run after the final commit, on the pushed SHA
caaafd30b, withgit diff HEADempty:vitest was invoked from the repository root, so the objectui#3378 false green (a package-dir cwd silently running
apps/console's 22 files) is excluded: the run reportsRUN v4.1.10 /home/user/objectui-issue-7888and 2 test files, not 22.The eslint run is a declared narrowing, and here is why it measures the whole question. Population read from ESLint's own config resolution rather than a guess about which files count: of 6,481 tracked files, 4,331 are js/ts-shaped and
isPathIgnoredputs 4,329 of them in the linted population, both edited files included. File count linted comes from--format json: 2. Invariance:eslint.config.jsdeclares noprojectServiceand noparserOptions.project, so no rule is type-aware and this diff cannot move the verdict on any file it did not touch. The repo-wide run is CI's.Changeset checker verdict, quoted verbatim and obeyed rather than reasoned about:
Governed-surface guard, quoted verbatim:
Left as draft: the PM seat runs the three pre-landing checks and drives the merge queue.
Generated by Claude Code